package com.bruce.main.ui;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.bruce.main.bean.SignBean;

import me.goldze.mvvmhabit.base.ItemViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class ItemModel extends ItemViewModel<ViewModel> {
    public ObservableField<SignBean> bean = new ObservableField<>();
    public ItemModel(@NonNull ViewModel viewModel, SignBean signBean) {
        super(viewModel);
        bean.set(signBean);
    }
    public BindingCommand deleteItem = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            viewModel.deleteItem(ItemModel.this);
        }
    });
}
